package my.test;

import org.apache.commons.lang3.StringUtils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;

public class Araa {


    public static void main(String[] args) throws Exception {
        File file = new File("D:/file.txt");
        BufferedReader reader = new BufferedReader(new FileReader(file));

        String len = null;
        List<String> add = new ArrayList<>();
        while ((len = reader.readLine()) != null) {
            add.add(len);
        }

        System.out.println(StringUtils.join(add, ","));


    }


}
